<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    function getNum(args) {
       return  args.reduce((pre,cur) => pre+cur)
    }
    function doAdd(fn,...args) {
        return fn(args)
    }

    console.log(doAdd(getNum,1,2,3))
</script>
</body>
</html>